package com.etrans.util;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class MapUtil {
	
	/**
	 * key首字母大写
	 */
	public static Map<String, Object> parseToBusinessMap(Map<String, Object> map){
		Map<String, Object> result = new HashMap<String,Object>();
		Set<String> keys = map.keySet();
		for(String key : keys){
			result.put(firstLetterToUpper(key), map.get(key));
		}
		keys = null;
		return result;
	}
	
	private static String firstLetterToUpper(String str){
        char[] array = str.toCharArray();
        array[0] -= 32;
        return String.valueOf(array);
    } 
}
